/**   
 * Copyright © 2018 HIT akeil. Tech Ltd. All rights reserved.
 * 
 * 功能描述�?
 * @Package: com.akeil.event 
 * @author: snow   
 * @date: 2018�?8�?3�? 下午1:23:53 
 */
package com.akeil.flash.config;


public enum EDeviceType {
	MANUAL((byte)0x01,"手动闪点"),	// 闭口
	AUTO((byte)0x02,"自动闪点");		// 开口
	
	private byte code;
	private String name;
	
	private EDeviceType(byte code,String name){
		this.code = code;
		this.name = name;
	}

	public int getCode() {
		return code;
	}

	public void setCode(byte code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static EDeviceType getByValue(int value) {
        for (EDeviceType code : values()) {
            if (code.getCode() == value) {
                return code;
            }
        }
        return null;
    }
}
